	<script type="text/javascript">
		$(".year").change(function(){
			sort('year',$(this).val());
		})

		$(".major").change(function(){
			sort('major',$(this).val());
		})

		//排序
		function sort(type,id){
			var url = "{{$smarty.server.REQUEST_URI}}";
			url = setURLArg(url,type,id);
			document.location.href = url;
		}

		//更改url中的参数值
		function setURLArg(url,arg,arg_val){ 
		    var pattern=arg+'-([^/]*)'; 
		    var pattern2=arg+'=([^&]*)'; 
		    var replaceText = '';
		    if(arg_val!=''){
		    	replaceText=arg+'-'+arg_val; 
		    }
		    if(url.match(pattern)){
		    	if(arg_val==''){
		    		var tmp2='/('+ arg+'-)([^/]*)\\//gi'; 
		    		url=url.replace(eval(tmp2),''); 
		    	}
		        var tmp='/('+ arg+'-)([^/]*)/gi'; 
		        tmp=url.replace(eval(tmp),replaceText); 
		        return tmp; 
		    }else if(url.match(pattern2)){
		    	if(arg_val==''){
		    		var tmp2='/\\&('+ arg+'=)([^&]*)/gi'; 
		    		url=url.replace(eval(tmp2),''); 
		    	}
		        var tmp='/('+ arg+'=)([^&]*)/gi'; 
		        tmp=url.replace(eval(tmp),replaceText.replace('-','=')); 
		        return tmp; 
		    }else if(arg_val!=''){ 
		        if(url.match('[\?]')){ 
		            return url+'&'+replaceText.replace('-','='); 
		        }else{ 
		            if(url.substr(-1)=='/'){
		            	return url+replaceText+'/'; 
		            }else{
		            	return url+'/'+replaceText+'/';
		            }
		        } 
		    } 
		    return url; 
		}
	</script>

</body>
</html>
<style type="text/css">
table tr td:nth-child(1){text-align: right;}
label span{display: block;float: left;}
label input{display: block;float: left;margin-right: 20px;}
table tr td select{min-width: 150px;}
</style>